
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>1.5UI卡顿掉帧原因 · zhoufei-iosknowledges</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="zhoufei">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="yibuhuizhi.html" />
    
    
    <link rel="prev" href="tuxiangxianshi.html" />
    

    
        <link rel="shortcut icon" href='../../source/images/favicon.jpg' type="image/x-icon">
    
    
        <link rel="bookmark" href='../../source/images/favicon.jpg' type="image/x-icon">
    
    
        <link rel="apple-touch-icon" href='../../source/images/apple-touch-icon.jpg'>
    
    
        
        <link rel="apple-touch-icon" sizes="120x120" href="../../source/images/apple-touch-icon.jpg">
        
        <link rel="apple-touch-icon" sizes="180x180" href="../../source/images/apple-touch-icon.jpg">
        
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"zhou415770319","repo":"iosKnowledges","type":"star","size":"small","count":true}]};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.feiyum.cn/index/" target="_blank" class="custom-link">我的博客</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    iOS面试题总结
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="ui.html">
            
                <a href="ui.html">
            
                    
                    1、UI视图相关面试题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="UITableview.html">
            
                <a href="UITableview.html">
            
                    
                    1.1UITableview相关面试题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="shujutongbu.html">
            
                <a href="shujutongbu.html">
            
                    
                    1.2数据源同步
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="shijianchuandi.html">
            
                <a href="shijianchuandi.html">
            
                    
                    1.3UI事件传递与响应
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="tuxiangxianshi.html">
            
                <a href="tuxiangxianshi.html">
            
                    
                    1.4UI图像显示原理
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.5" data-path="kadundiaozheng.html">
            
                <a href="kadundiaozheng.html">
            
                    
                    1.5UI卡顿掉帧原因
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="yibuhuizhi.html">
            
                <a href="yibuhuizhi.html">
            
                    
                    1.6异步绘制原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="lipingxuanran.html">
            
                <a href="lipingxuanran.html">
            
                    
                    1.7离屏渲染
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../oc/2.html">
            
                <a href="../oc/2.html">
            
                    
                    2、OC语言
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../oc/2.1.html">
            
                <a href="../oc/2.1.html">
            
                    
                    2.1OC相关面试题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../oc/2.2.html">
            
                <a href="../oc/2.2.html">
            
                    
                    2.2分类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../oc/2_4.html">
            
                <a href="../oc/2_4.html">
            
                    
                    2.4扩展
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../oc/2.5.html">
            
                <a href="../oc/2.5.html">
            
                    
                    2.5代理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../oc/2.6.html">
            
                <a href="../oc/2.6.html">
            
                    
                    2.6通知
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../oc/2.7.html">
            
                <a href="../oc/2.7.html">
            
                    
                    2.7KVO
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../oc/2.8.html">
            
                <a href="../oc/2.8.html">
            
                    
                    2.8KVC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../oc/2.9.html">
            
                <a href="../oc/2.9.html">
            
                    
                    2.9属性关键字
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../runtime/3.html">
            
                <a href="../runtime/3.html">
            
                    
                    3、Runtime
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../runtime/3.1.html">
            
                <a href="../runtime/3.1.html">
            
                    
                    3.1对象、类对象、元类对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../runtime/3.2.html">
            
                <a href="../runtime/3.2.html">
            
                    
                    3.2消息传递机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../runtime/3.3.html">
            
                <a href="../runtime/3.3.html">
            
                    
                    3.3消息转发流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../runtime/3.4.html">
            
                <a href="../runtime/3.4.html">
            
                    
                    3.4Method-Swizzling
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../neicun/4.html">
            
                <a href="../neicun/4.html">
            
                    
                    4、内存
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../neicun/4.1.html">
            
                <a href="../neicun/4.1.html">
            
                    
                    4.1引用计数表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../neicun/4.2.html">
            
                <a href="../neicun/4.2.html">
            
                    
                    4.2弱引用表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../neicun/4.3.html">
            
                <a href="../neicun/4.3.html">
            
                    
                    4.3ARC、MRC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../neicun/4.4.html">
            
                <a href="../neicun/4.4.html">
            
                    
                    4.4循环引用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../neicun/4.5.html">
            
                <a href="../neicun/4.5.html">
            
                    
                    4.5内存管理
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../block/5.html">
            
                <a href="../block/5.html">
            
                    
                    5、Block
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../block/5.1.html">
            
                <a href="../block/5.1.html">
            
                    
                    5.1Block本质
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../block/5.2.html">
            
                <a href="../block/5.2.html">
            
                    
                    5.2截获变量特性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../block/5.3.html">
            
                <a href="../block/5.3.html">
            
                    
                    5.3内存管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../block/5.4.html">
            
                <a href="../block/5.4.html">
            
                    
                    5.4循环引用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../duoxiancheng/6.html">
            
                <a href="../duoxiancheng/6.html">
            
                    
                    6、多线程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../duoxiancheng/6.1.html">
            
                <a href="../duoxiancheng/6.1.html">
            
                    
                    6.1GCD、nsoperation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../duoxiancheng/6.2.html">
            
                <a href="../duoxiancheng/6.2.html">
            
                    
                    6.2资源共享
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../duoxiancheng/6.3.html">
            
                <a href="../duoxiancheng/6.3.html">
            
                    
                    6.3线程同步
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../duoxiancheng/6.4.html">
            
                <a href="../duoxiancheng/6.4.html">
            
                    
                    6.4SpinLock等
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../runloop/7.md">
            
                <span>
            
                    
                    7、RunLoop
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../runloop/7.1.md">
            
                <span>
            
                    
                    7.1事件循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../runloop/7.2.md">
            
                <span>
            
                    
                    7.2用户态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../runloop/7.3.md">
            
                <span>
            
                    
                    7.3核心态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../runloop/7.4.md">
            
                <span>
            
                    
                    7.4常驻线程
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../network/8.md">
            
                <span>
            
                    
                    8、网络
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../network/8.1.md">
            
                <span>
            
                    
                    8.1HTTPS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../network/8.2.md">
            
                <span>
            
                    
                    8.2对称加密算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../network/8.3.md">
            
                <span>
            
                    
                    8.3非对称加密
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="../network/8.4.md">
            
                <span>
            
                    
                    8.4DNS解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" data-path="../network/8.5.md">
            
                <span>
            
                    
                    8.5HTTP、TCP
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >1.5UI卡顿掉帧原因</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><ul><li><span class="title-icon "></span><a href="#15ui&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;"><b></b>1.5UI&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;</a></li></ul></ul></div><a href="#" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h2 id="15ui&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;"><a name="15ui&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;" class="anchor-navigation-ex-anchor" href="#15ui&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;"><i class="fa fa-link" aria-hidden="true"></i></a><a name="15ui&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;" class="plugin-anchor" href="#15ui&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;"><i class="fa fa-link" aria-hidden="true"></i></a>1.5UI&#x5361;&#x987F;&#x6389;&#x5E27;&#x539F;&#x56E0;</h2>
<p><img src="../../img/ui-9.png" alt=""></p>
<p>&#x5361;&#x987F;&#x539F;&#x56E0;&#x5206;&#x6790;</p>
<p>&#x5927;&#x4F53;&#x6709;&#x4E09;&#x79CD;&#x539F;&#x56E0;&#xFF1A;
1.UI&#x6E32;&#x67D3;&#x9700;&#x8981;&#x65F6;&#x95F4;&#x8F83;&#x957F;&#xFF0C;&#x65E0;&#x6CD5;&#x6309;&#x65F6;&#x63D0;&#x4EA4;&#x7ED3;&#x679C;&#x3002;</p>
<p>2.&#x4E00;&#x4E9B;&#x9700;&#x8981;&#x5BC6;&#x96C6;&#x8BA1;&#x7B97;&#x7684;&#x5904;&#x7406;&#x653E;&#x5728;&#x4E86;&#x4E3B;&#x7EBF;&#x7A0B;&#x4E2D;&#x6267;&#x884C;&#xFF0C;&#x5BFC;&#x81F4;&#x4E3B;&#x7EBF;&#x7A0B;&#x88AB;&#x963B;&#x585E;&#xFF0C;&#x65E0;&#x6CD5;&#x6E32;&#x67D3;UI&#x754C;&#x9762;&#x3002;</p>
<p>3.&#x7F51;&#x7EDC;&#x8BF7;&#x6C42;&#x7531;&#x4E8E;&#x7F51;&#x7EDC;&#x72B6;&#x6001;&#x7684;&#x95EE;&#x9898;&#x54CD;&#x5E94;&#x8F83;&#x6162;&#xFF0C;UI&#x5C42;&#x7531;&#x4E8E;&#x6CA1;&#x6709;&#x6A21;&#x578B;&#x8FD4;&#x56DE;&#x65E0;&#x6CD5;&#x6E32;&#x67D3;&#x3002;</p>
<p>CPU&#x8D44;&#x6E90;&#x6D88;&#x8017;&#x5206;&#x6790;</p>
<p>1.&#x5BF9;&#x8C61;&#x521B;&#x5EFA;&#xFF1A;&#x5BF9;&#x8C61;&#x7684;&#x521B;&#x5EFA;&#x4F1A;&#x5206;&#x914D;&#x5185;&#x5B58;&#x3001;&#x8C03;&#x6574;&#x5C5E;&#x6027;&#x3001;&#x751A;&#x81F3;&#x8FD8;&#x6709;&#x8BFB;&#x53D6;&#x6587;&#x4EF6;&#x7B49;&#x64CD;&#x4F5C;&#xFF0C;&#x6BD4;&#x8F83;&#x6D88;&#x8017;CPU&#x8D44;&#x6E90;&#x3002;&#x5C3D;&#x91CF;&#x91C7;&#x53D6;&#x8F7B;&#x91CF;&#x7EA7;&#x5BF9;&#x8C61;&#xFF0C;&#x5C3D;&#x91CF;&#x653E;&#x5230;&#x540E;&#x53F0;&#x7EBF;&#x7A0B;&#x5904;&#x7406;&#xFF0C;&#x5C3D;&#x91CF;&#x63A8;&#x8FDF;&#x5BF9;&#x8C61;&#x7684;&#x521B;&#x5EFA;&#x65F6;&#x95F4;&#x3002;&#xFF08;&#x5982;UIView  /  CALayer&#xFF09;</p>
<p>2.&#x5BF9;&#x8C61;&#x8C03;&#x6574;&#xFF1A;frame&#x3001;bounds&#x3001;transform&#x53CA;&#x89C6;&#x56FE;&#x5C42;&#x6B21;&#x7B49;&#x5C5E;&#x6027;&#x8C03;&#x6574;&#x5F88;&#x8017;&#x8D39;CPU&#x8D44;&#x6E90;&#x3002;&#x5C3D;&#x91CF;&#x51CF;&#x5C11;&#x4E0D;&#x5FC5;&#x8981;&#x5C5E;&#x6027;&#x7684;&#x4FEE;&#x6539;&#xFF0C;&#x5C3D;&#x91CF;&#x907F;&#x514D;&#x8C03;&#x6574;&#x89C6;&#x56FE;&#x5C42;&#x6B21;&#x3001;&#x6DFB;&#x52A0;&#x548C;&#x79FB;&#x9664;&#x89C6;&#x56FE;&#x3002;</p>
<p>3.&#x5E03;&#x5C40;&#x8BA1;&#x7B97;&#xFF1A;&#x968F;&#x7740;&#x89C6;&#x56FE;&#x6570;&#x91CF;&#x7684;&#x589E;&#x957F;&#xFF0C;Autolayout&#x5E26;&#x6765;&#x7684;CPU&#x6D88;&#x8017;&#x4F1A;&#x5448;&#x6307;&#x6570;&#x7EA7;&#x589E;&#x957F;&#xFF0C;&#x6240;&#x4EE5;&#x5C3D;&#x91CF;&#x63D0;&#x524D;&#x7B97;&#x597D;&#x5E03;&#x5C40;&#xFF0C;&#x5728;&#x9700;&#x8981;&#x65F6;&#x4E00;&#x6B21;&#x6027;&#x8C03;&#x6574;&#x597D;&#x5BF9;&#x5E94;&#x5C5E;&#x6027;&#x3002;</p>
<p>4.&#x6587;&#x672C;&#x6E32;&#x67D3;&#xFF1A;&#x5C4F;&#x5E55;&#x4E0A;&#x80FD;&#x770B;&#x5230;&#x7684;&#x6240;&#x6709;&#x6587;&#x672C;&#x5185;&#x5BB9;&#x63A7;&#x4EF6;&#xFF0C;&#x5305;&#x62EC;UIWebView&#xFF0C;&#x5728;&#x5E95;&#x5C42;&#x90FD;&#x662F;&#x901A;&#x8FC7;CoreText&#x6392;&#x7248;&#x3001;&#x7ED8;&#x5236;&#x4E3A;&#x4F4D;&#x56FE;&#x663E;&#x793A;&#x7684;&#x3002;&#x5E38;&#x89C1;&#x7684;&#x6587;&#x672C;&#x63A7;&#x4EF6;&#xFF0C;&#x5176;&#x6392;&#x7248;&#x4E0E;&#x7ED8;&#x5236;&#x90FD;&#x662F;&#x5728;&#x4E3B;&#x7EBF;&#x7A0B;&#x8FDB;&#x884C;&#x7684;&#xFF0C;&#x663E;&#x793A;&#x5927;&#x91CF;&#x6587;&#x672C;&#x662F;&#xFF0C;CPU&#x538B;&#x529B;&#x5F88;&#x5927;&#x3002;&#x5BF9;&#x6B64;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#x552F;&#x4E00;&#x5C31;&#x662F;&#x81EA;&#x5B9A;&#x4E49;&#x6587;&#x672C;&#x63A7;&#x4EF6;&#xFF0C;&#x7528;CoreText&#x5BF9;&#x6587;&#x672C;&#x5F02;&#x6B65;&#x7ED8;&#x5236;&#x3002;&#xFF08;&#x5F88;&#x9EBB;&#x70E6;&#xFF0C;&#x5F00;&#x53D1;&#x6210;&#x672C;&#x9AD8;&#xFF09;</p>
<p>5.&#x56FE;&#x7247;&#x89E3;&#x7801;&#xFF1A;&#x5F53;&#x7528;UIImage&#x6216;CGImageSource&#x521B;&#x5EFA;&#x56FE;&#x7247;&#x65F6;&#xFF0C;&#x56FE;&#x7247;&#x6570;&#x636E;&#x5E76;&#x4E0D;&#x4F1A;&#x7ACB;&#x523B;&#x89E3;&#x7801;&#x3002;&#x56FE;&#x7247;&#x8BBE;&#x7F6E;&#x5230;UIImageView&#x6216;CALayer.contents&#x4E2D;&#x53BB;&#xFF0C;&#x5E76;&#x4E14;CALayer&#x88AB;&#x63D0;&#x4EA4;&#x5230;GPU&#x524D;&#xFF0C;CGImage&#x4E2D;&#x7684;&#x6570;&#x636E;&#x624D;&#x4F1A;&#x5F97;&#x5230;&#x89E3;&#x7801;&#x3002;&#x8FD9;&#x4E00;&#x6B65;&#x662F;&#x53D1;&#x751F;&#x5728;&#x4E3B;&#x7EBF;&#x7A0B;&#x7684;&#xFF0C;&#x5E76;&#x4E14;&#x4E0D;&#x53EF;&#x907F;&#x514D;&#x3002;SD_WebImage&#x5904;&#x7406;&#x65B9;&#x5F0F;&#xFF1A;&#x5728;&#x540E;&#x53F0;&#x7EBF;&#x7A0B;&#x5148;&#x628A;&#x56FE;&#x7247;&#x7ED8;&#x5236;&#x5230;CGBitmapContext&#x4E2D;&#xFF0C;&#x7136;&#x540E;&#x4ECE;Bitmap&#x76F4;&#x63A5;&#x521B;&#x5EFA;&#x56FE;&#x7247;&#x3002;</p>
<p>6.&#x56FE;&#x50CF;&#x7ED8;&#x5236;&#xFF1A;&#x56FE;&#x50CF;&#x7684;&#x7ED8;&#x5236;&#x901A;&#x5E38;&#x662F;&#x6307;&#x7528;&#x90A3;&#x4E9B;&#x4EE5;CG&#x5F00;&#x5934;&#x7684;&#x65B9;&#x6CD5;&#x628A;&#x56FE;&#x50CF;&#x7ED8;&#x5236;&#x5230;&#x753B;&#x5E03;&#x4E2D;&#xFF0C;&#x7136;&#x540E;&#x4ECE;&#x753B;&#x5E03;&#x521B;&#x5EFA;&#x56FE;&#x7247;&#x5E76;&#x663E;&#x793A;&#x7684;&#x4E00;&#x4E2A;&#x8FC7;&#x7A0B;&#x3002;CoreGraphics&#x65B9;&#x6CD5;&#x662F;&#x7EBF;&#x7A0B;&#x5B89;&#x5168;&#x7684;&#xFF0C;&#x53EF;&#x4EE5;&#x5F02;&#x6B65;&#x7ED8;&#x5236;&#xFF0C;&#x4E3B;&#x7EBF;&#x7A0B;&#x56DE;&#x8C03;&#x3002;</p>
<p>GPU&#x8D44;&#x6E90;&#x6D88;&#x8017;&#x5206;&#x6790;</p>
<pre><code>&#x2022;&#x7EB9;&#x7406;&#x6DF7;&#x5408;&#xFF1A;&#x5C3D;&#x91CF;&#x51CF;&#x5C11;&#x77ED;&#x65F6;&#x95F4;&#x5185;&#x5927;&#x91CF;&#x56FE;&#x7247;&#x7684;&#x663E;&#x793A;&#xFF0C;&#x5C3D;&#x53EF;&#x80FD;&#x5C06;&#x591A;&#x5F20;&#x56FE;&#x7247;&#x5408;&#x6210;&#x4E00;&#x5F20;&#x8FDB;&#x884C;&#x663E;&#x793A;&#x3002;
&#x2022;&#x89C6;&#x56FE;&#x6DF7;&#x5408;&#xFF1A;&#x5C3D;&#x91CF;&#x51CF;&#x5C11;&#x89C6;&#x56FE;&#x5C42;&#x6B21;&#x548C;&#x6570;&#x91CF;&#xFF0C;&#x5E76;&#x5728;&#x4E0D;&#x900F;&#x660E;&#x7684;&#x89C6;&#x56FE;&#x91CC;&#x6807;&#x660E;opaque&#x5C5E;&#x6027;&#x4EE5;&#x907F;&#x514D;&#x65E0;&#x7528;&#x7684;Alpha&#x901A;&#x9053;&#x5408;&#x6210;&#x3002;
&#x2022;&#x56FE;&#x5F62;&#x751F;&#x6210;&#xFF1A;&#x5C3D;&#x91CF;&#x907F;&#x514D;&#x79BB;&#x5C4F;&#x6E32;&#x67D3;&#xFF0C;&#x5C3D;&#x91CF;&#x91C7;&#x7528;&#x5F02;&#x6B65;&#x7ED8;&#x5236;&#xFF0C;&#x5C3D;&#x91CF;&#x907F;&#x514D;&#x4F7F;&#x7528;&#x5706;&#x89D2;&#x3001;&#x9634;&#x5F71;&#x3001;&#x906E;&#x7F69;&#x7B49;&#x5C5E;&#x6027;&#x3002;&#x5FC5;&#x8981;&#x65F6;&#x7528;&#x9759;&#x6001;&#x56FE;&#x7247;&#x5B9E;&#x73B0;&#x5C55;&#x793A;&#x6548;&#x679C;&#xFF0C;&#x4E5F;&#x53EF;&#x5C1D;&#x8BD5;&#x5149;&#x6805;&#x5316;&#x7F13;&#x5B58;&#x590D;&#x7528;&#x5C5E;&#x6027;&#x3002;
Instruments &#x5361;&#x987F;&#x76D1;&#x6D4B;
Time Profiler -&gt;Call Tree Options :
1.Separete By Thread :&#x6309;&#x7EBF;&#x7A0B;&#x5212;&#x5206;
2.Invert Call Tree &#xFF1A;&#x9006;&#x5411;&#x8C03;&#x7528;&#x6811;&#xFF0C;&#x65B9;&#x4FBF;&#x67E5;&#x770B;&#x8C03;&#x7528;&#x987A;&#x5E8F;
3.Hide System Libraries&#xFF1A;&#x9690;&#x85CF;&#x7CFB;&#x7EDF;&#x5E93;
Core Animation -&gt;Debug Options :
1.Color Blended Layers :&#x76D1;&#x6D4B;&#x56FE;&#x5C42;&#x6DF7;&#x5408;&#x60C5;&#x51B5;&#xFF0C;&#x6CA1;&#x6709;&#x6DF7;&#x5408;&#x7684;&#x90E8;&#x5206;&#x4E3A;&#x7EFF;&#x8272;&#xFF0C;&#x6DF7;&#x5408;&#x6700;&#x4E25;&#x91CD;&#x7684;&#x90E8;&#x5206;&#x662F;&#x7EA2;&#x8272;&#xFF0C;&#x5927;&#x91CF;&#x56FE;&#x5C42;&#x6DF7;&#x5408;&#x4F1A;&#x6D88;&#x8017;GPU&#x7684;&#x65F6;&#x95F4;&#x3002;
2.Color Copied Images :&#x76D1;&#x6D4B;&#x56FE;&#x7247;&#x989C;&#x8272;&#x683C;&#x5F0F;&#xFF0C;&#x5982;&#x679C;GPU&#x4E0D;&#x652F;&#x6301;&#x5F53;&#x524D;&#x56FE;&#x7247;&#x7684;&#x989C;&#x8272;&#x683C;&#x5F0F;&#xFF0C;&#x4F1A;&#x5C06;&#x5176;&#x4EA4;&#x7ED9;CPU&#x9884;&#x5148;&#x8FDB;&#x884C;&#x683C;&#x5F0F;&#x8F6C;&#x5316;&#xFF0C;&#x5E76;&#x4E14;&#x8FD9;&#x5F20;&#x56FE;&#x7247;&#x88AB;&#x6807;&#x8BB0;&#x4E3A;&#x84DD;&#x8272;&#x3002;&#xFF08;Apple &#x7684; GPU&#x503C;&#x89E3;&#x6790;32bit&#x7684;&#x989C;&#x8272;&#x683C;&#x5F0F;&#xFF0C;RGBA)

Color Immediately &#xFF1A;&#x8BBE;&#x7F6E;&#x8C03;&#x8BD5;&#x989C;&#x8272;&#x6BCF;&#x5E27;&#x66F4;&#x65B0;&#x3002;&#xFF08;&#x4E00;&#x822C;&#x4E0D;&#x7528;&#xFF09;
Color Compositing-Fast-Path Blue &#xFF1A;&#x5BF9;&#x4EFB;&#x4F55;&#x76F4;&#x63A5;&#x4F7F;&#x7528;OpenGL&#x7ED8;&#x5236;&#x7684;&#x56FE;&#x5C42;&#x9AD8;&#x4EAE;&#x3002;
Flash Updated Regions &#xFF1A;&#x5BF9;&#x91CD;&#x7ED8;&#x7684;&#x5185;&#x5BB9;&#x9AD8;&#x4EAE;&#x6210;&#x9EC4;&#x8272;&#x3002;&#xFF08;&#x4F7F;&#x7528;Core Graphics&#x7ED8;&#x5236;&#x7684;&#x56FE;&#x5C42;&#xFF09;
Color Hits Green and Misses Red &#xFF1A;&#x5149;&#x6805;&#x5316;&#x76D1;&#x6D4B;&#xFF0C;&#x524D;&#x9762;&#x5DF2;&#x8FF0;&#x3002;
Color Offscreen-Renderded Yellow &#xFF1A;&#x79BB;&#x5C4F;&#x6E32;&#x67D3;&#x76D1;&#x6D4B;&#xFF0C;&#x524D;&#x9762;&#x5DF2;&#x8FF0;&#x3002;
Color Non-Standard Surface Formats&#xFF1A;Apple &#x6587;&#x6863;&#x6CA1;&#x6CE8;&#x89E3;&#xFF08;&#x4E00;&#x822C;&#x4E0D;&#x7528;&#xFF09;
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="tuxiangxianshi.html" class="navigation navigation-prev " aria-label="Previous page: 1.4UI图像显示原理">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="yibuhuizhi.html" class="navigation navigation-next " aria-label="Next page: 1.6异步绘制原理">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"1.5UI卡顿掉帧原因","level":"1.2.5","depth":2,"next":{"title":"1.6异步绘制原理","level":"1.2.6","depth":2,"path":"md/ui/yibuhuizhi.md","ref":"md/ui/yibuhuizhi.md","articles":[]},"previous":{"title":"1.4UI图像显示原理","level":"1.2.4","depth":2,"path":"md/ui/tuxiangxianshi.md","ref":"md/ui/tuxiangxianshi.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","splitter","expandable-chapters-small","anchors","github","github-buttons","donate","sharing-plus","anchor-navigation-ex","favicon","livereload"],"styles":{"website":"./styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"github":{"url":"https://github.com/zhou415770319"},"livereload":{},"splitter":{},"search":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"donate":{"alipay":"../../img/alipay.JPG","alipayText":" ","button":"赞赏","title":"","wechat":"","wechatText":"微信打赏"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":false},"favicon":{"shortcut":"./source/images/favicon.jpg","bookmark":"./source/images/favicon.jpg","appleTouch":"./source/images/apple-touch-icon.jpg","appleTouchMore":{"120x120":"./source/images/apple-touch-icon.jpg","180x180":"./source/images/apple-touch-icon.jpg"}},"github-buttons":{"buttons":[{"user":"zhou415770319","repo":"iosKnowledges","type":"star","size":"small","count":true}]},"expandable-chapters-small":{},"sharing":{"qq":false,"all":["google","facebook","weibo","twitter","qq","qzone","linkedin","pocket"],"douban":false,"facebook":false,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{}},"theme":"default","author":"zhoufei","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"zhoufei-iosknowledges","language":"zh-hans","links":{"sidebar":{"我的博客":"http://www.feiyum.cn/index/"}},"gitbook":"3.2.3","description":"ios面试知识点总结"},"file":{"path":"md/ui/kadundiaozheng.md","mtime":"2019-05-03T14:40:51.322Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-03T14:51:39.741Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

